let a = [2, 1, 5, 5, 3];
console.log(a.reverse()); // [3,5,5,1,2]
console.log(a); // [3,5,5,1,2]
